package com.twu.biblioteca.options;

import com.twu.biblioteca.library.Library;
import com.twu.biblioteca.streams.AppOutputStream;

import java.io.IOException;

public class ViewAllMovies implements Option {

    @Override
    public void execute() throws IOException {
        String allMovies = Library.getLibrary().viewAllMovies();
        AppOutputStream.writeLine("Movie  Year  Director  Rating\n");
        AppOutputStream.writeLine(allMovies);
    }

    @Override
    public String toString() {
        return "View All Movies";
    }
}
